<!-- map-selector -->
<div class="box-wrapper" ng-controller="MapSelectorCtrl">
  <div class="box-header">
    <div class="shadowDiv"></div>
    <img src="img/alarm.png" class="header-image pull-left">
    <div class="header-title pull-left">警情选项</div>
    <div class="header-tool pull-right">
      <button class="btn btn-img" ng-click="toggle()">
        <img src="img/dropdown.png" ng-class="{'toggle': isFold}">
      </button>
    </div>
    <div class="septal-line pull-right"></div>
  </div>

  <div class="box-content" ng-class="{'fold': isFold}">
    <div class="main-type">
      <select ng-model="option.anaType">
        <option ng-repeat="type in anaTypes" value="{{type.name}}">{{type.value}}</option>
      </select>
    </div>

    <div class="option-list">
      <div class="list-bar">
        <span class="bar-header">日期范围:</span>
        <div class="bar-content">
          <input type="date" class="nxt-input" ng-model="option.startDate">
          到
          <input type="date" class="nxt-input" ng-model="option.endDate">
        </div>
      </div>

      <div class="list-bar">
        <span class="bar-header">时间范围:</span>
        <div class="bar-content">
          <select ng-model="option.startHour" class="nxt-input">
            <option ng-repeat="hour in hourList" value="{{hour}}">{{hour}}时</option>
          </select>
          到
          <select ng-model="option.endHour" class="nxt-input">
            <option ng-repeat="hour in hourList" value="{{hour}}">{{hour}}时</option>
          </select>
        </div>
      </div>

      <div class="list-bar">
        <span class="bar-header">警情类型:</span>
        <div class="bar-content">
          <div class="checkbox-group">
            <div ng-repeat="(index, type) in types">
              <label class="checkbox-inline nxt-checkbox">
                <input type="checkbox" class="form-control" ng-checked="haveType(type.name)" ng-click="checkType(index, type.name)">
                <span ng-click="checkShowType(index)">{{type.name}}</span>
              </label>
              <div class="sub-group" ng-show="showType == index">
                <div ng-repeat="child in type.children">
                  <label class="checkbox-inline nxt-checkbox" >
                    <input type="checkbox" class="form-control" ng-checked="haveSubType(child)" ng-click="checkSubType(child)">{{child}}
                  </label>
                </div>
              </div>
            </div>
          </div>
          


        </div>
      </div>

      <!-- <div class="list-bar">
        <span class="bar-header">空间分析单元:</span>
        <div class="bar-content">
          <label class="nxt-radio" ng-class="{'checked': option.spaceCell=='square'}">
            <input type="radio" ng-model="option.spaceCell" value="square">
            <span>方格</span>
          </label>
          <label class="nxt-radio" ng-class="{'checked': option.spaceCell=='hexagon'}">
            <input type="radio" ng-model="option.spaceCell" value="hexagon">
            <span>蜂窝</span>
          </label>
          <label class="nxt-radio" ng-class="{'checked': option.spaceCell=='cross'}">
            <input type="radio" ng-model="option.spaceCell" value="cross">
            <span>十字路口</span>
          </label>
          <label class="nxt-radio" ng-class="{'checked': option.spaceCell=='point'}">
            <input type="radio" ng-model="option.spaceCell" value="point">
            <span>点</span>
          </label>
          <label class="nxt-radio" ng-class="{'checked': option.spaceCell=='police'}">
            <input type="radio" ng-model="option.spaceCell" value="police">
            <span>派出所</span>
          </label>
          <label class="nxt-radio" ng-class="{'checked': option.spaceCell=='density'}">
            <input type="radio" ng-model="option.spaceCell" value="density">
            <span>密度图</span>
          </label>
        </div>
      </div>

      <div class="list-bar" ng-show="option.anaType != 'space'">
        <span class="bar-header">时间分析单元:</span>
        <div class="bar-content">
          <label class="nxt-radio" ng-class="{'checked': option.timeCell=='hour'}" ng-show="option.anaType == 'timeSpace'">
            <input type="radio"ng-model="option.timeCell" value="hour">
            <span>时分布</span>
          </label>
          <label class="nxt-radio" ng-class="{'checked': option.timeCell=='week'}">
            <input type="radio"ng-model="option.timeCell" value="week">
            <span>星期分布</span>
          </label>
          <label class="nxt-radio" ng-class="{'checked': option.timeCell=='month'}">
            <input type="radio" ng-model="option.timeCell" value="month">
            <span>月分布</span>
          </label>
          <label class="nxt-radio" ng-class="{'checked': option.timeCell=='year'}">
            <input type="radio" ng-model="option.timeCell" value="year">
            <span>年分布</span>
          </label>
        </div>
      </div> -->

    </div>

    <div class="option-button">
      <button class="btn btn-green" ng-click="submit()">开始分析</button>
    </div>
  </div>
</div><!-- end map-selector -->